﻿using ReflectionStudio.Components.UserControls;
using ReflectionStudio.Core.Events;
using System;
using System.ComponentModel;
using System.Data;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
namespace WPFExcelReport
{
    public partial class MainWindow : DocumentBase
    {
        public MainWindow()
        {

            DataContext = new ViewModelBase();
            InitializeComponent();
            ReSetTab();
            this.Name = "客户地址管理";

        }
        string CurrentUI = "";
        ViewBase ui;
        public override void OnWorkflowIDChange(MessageEventArgs e)
        {
            base.OnWorkflowIDChange(e);
            string wfid = e.Info.Details;
            switch (wfid)
            {
                case "TKUNDADR":
                    if (CurrentUI == wfid)
                        return;
                    CurrentUI = wfid;
                    ui = new TKUNDADR(); 
                    //EK02.KRS = e.Info.KRS;
                    //EK02.LFD = e.Info.LFD;
                    MainTab.Children.Add(ui);
                    break; 

            }
        }
        private void ReSetTab()
        {

        }
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            try
            {
                if (DesignerProperties.GetIsInDesignMode(this))
                    return;
                if (IsLoaded)
                    return;
                IsLoaded = true;
            }
            catch (Exception ex)
            {
                Tracer.Error(ex.StackTrace, ex);
            }
            return;

        }

    }
}
